/**
 * @param {string} digits
 * @return {string[]}
 * 还没有写好
 */
var letterCombinations = function(digits) {
  let strs = {
    "0":[],"1":[],
    "2":["a","b","c"],
    "3":["d","e","f"],
    "4":["g","h","i"],
    "5":["j","k","l"],
    "6":["m","n","o"],
    "7":["p","q","r","s"],
    "8":["t","u","v"],
    "9":["w","x","y","z"], 
  }
  let strResult = ""
 digits.length == 0 ? strResult = false : strResult = /\d/g.test(Number(digits))
  let meetChar = []
  if (!strResult){return []}
  else{
    if (digits.length == 1){ meetChar = strs[digits] }
    else {
      let str = digits.split("")
      let arrStr = []
      for(let i of str){
        arrStr.push(strs[i])
      }
      for(let i = 0;i < arrStr[0].length;i++){
        for(let j = 0;j < arrStr[1].length;j++){
          meetChar.push(arrStr[0][i] + arrStr[1][j])
        }
      }
    }
  }
  return meetChar
};